'''
创建或编辑serializers.py文件，定义用于登录的序列化器：
'''

from rest_framework import serializers
from django.contrib.auth.models import User

class LoginSerializer(serializers.Serializer):
    username = serializers.CharField()
    password = serializers.CharField(write_only=True)